<template>
	<view>
		<view class="top">
			<!-- 设置登录密码 -->
			<view class="item">
				<text class="left">设置登录密码</text>
				<div class="right">
					<uni-icons type="right" size="20" color="#ddd"></uni-icons>
				</div>
			</view>
			<!-- 更改手机号 -->
			<view class="item">
				<text class="left">更改手机号</text>
				<div class="right">
					<uni-icons type="right" size="20" color="#ddd"></uni-icons>
				</div>
			</view>
			<!-- 密码支付 -->
			<view class="item">
				<text class="left">密码支付</text>
				<div class="right">
					<switch />
				</div>
			</view>
		</view>
		<view class="other">切换账户</view>
		<view class="other" @click="logOunt">退出登录</view>
	</view>
</template>

<script>
	import {
		mapMutations
	} from 'vuex'
	export default {
		data() {
			return {

			};
		},
		methods: {
			...mapMutations('user', ['setProfile', 'setToken']),
			// 退出登录
			logOunt() {
				uni.switchTab({
					url: '/pages/my/my'
				})
				this.setProfile('')
				this.setToken('')
			}
		}
	}
</script>

<style lang="scss">
	page {
		display: flex;
		flex-direction: column;
		padding: 20rpx;
		background-color: #f4f4f4;
		box-sizing: border-box;

		.top {
			background-color: #fff;
			padding: 0 20rpx;
			margin-bottom: 40rpx;

			.item {
				box-sizing: border-box;
				display: flex;
				justify-content: space-between;
				align-items: center;
				background-color: #fff;
				border-radius: 10rpx;
				line-height: 90rpx;
				padding-left: 10rpx;
				font-size: 30rpx;
				color: #333;
				border-top: 1rpx solid #ddd;
			}
		}

		.other {
			line-height: 90rpx;
			text-align: center;
			font-size: 32rpx;
			color: #333;
			background-color: #fff;
			margin-bottom: 20rpx;
			border-radius: 10rpx;
		}
	}
</style>